<?php

namespace app\validate;

use share\validate\SceneValidate;

class UserInfoValidate extends SceneValidate{
    protected $rule = [    
        'userId' => 'length:2,64',
        'identityId' => 'length:0,64',
        'email' => 'max:128',
        'phone' => 'max:20',
        'account' => 'max:64',
        'location' => 'require|max:20',
        'vendor' => 'require|length:2,60',
    
    ];    

    protected $scene = [
        'list' => ['userId','identityId','account','email','phone'],
        'edit' => ['userId','location'],
        'dataBoard' => ['vendor'],
        'deviceInfo' => ['userId'],
    ];
}